mirror of https://github.com/perkeep/perkeep.git
11 lines
186 B
Go
11 lines
186 B
Go
|
package mgo
|
||
|
|
||
|
func HackSocketsPerServer(newLimit int) (restore func()) {
|
||
|
oldLimit := newLimit
|
||
|
restore = func() {
|
||
|
socketsPerServer = oldLimit
|
||
|
}
|
||
|
socketsPerServer = newLimit
|
||
|
return
|
||
|
}
|