Anis Elleuch
754c0770d6
Merge ListenAndServe and ListenAndServeTLS for simplification purpose ( #3186 )
2016-11-05 20:32:13 -07:00
Harshavardhana
1105508453
connection muxer should use bufio.Reader to be simpler. ( #3177 )
2016-11-05 12:57:31 -07:00
Harshavardhana
1ba497950c
Fix net.Listener to fully close the underlying socket. ( #3171 )
...
Leads to races and accepting connections. This patch implements
a way to reject accepting new connections.
2016-11-05 09:43:28 -07:00
Harshavardhana
d192044915
router: PathPrefix router was wrong. ( #3172 )
2016-11-04 12:13:22 -07:00
Harshavardhana
9bb799462e
Start all listeners when a given host resolves to multiple IPs. ( #3145 )
...
Default golang net.Listen only listens on the first IP when
host resolves to multiple IPs.
This change addresses a problem for example your ``/etc/hosts``
has entries as following
```
127.0.1.1 minio1
192.168.1.10 minio1
```
Trying to start minio as
```
minio server --address "minio1:9001" ~/Photos
```
Causes the minio server to be bound only to "127.0.1.1" which
is an incorrect behavior since we are generally interested in
`192.168.1.10` as well.
This patch addresses this issue if the hostname is resolvable
and gives back list of addresses associated with that hostname
we just bind on all of them as it is the expected behavior.
2016-11-01 15:38:28 -07:00
Harshavardhana
3cfb23750a
control: Implement service command 'stop,restart,status'. ( #2883 )
...
- stop - stops all the servers.
- restart - restart all the servers.
- status - prints status of storage info about the cluster.
2016-10-09 23:03:10 -07:00
Harshavardhana
bc8f34bfe7
server/mux: Remove unused waitgroup from listenerMux. ( #2614 )
...
Change struct names to be more meaningful.
2016-09-02 19:07:42 -07:00
Harshavardhana
2020afd200
server: http.Server do not add deadlines causes issues. ( #2581 )
...
Adding deadlines is a no go since Golang doesn't back off
the timers if there is an active i/o in progress.
It is meant to be for applications to handle this themselves
and manually progress the deadlines.
Fixes #2561
2016-08-30 12:52:19 -07:00
Harshavardhana
c39d3db7a0
server/tls: allocate tls.Config{} properly. ( #2537 )
...
There is a golang bug which crashes the server, allocate tls.Config properly to avoid
this problem.
```
2016/08/22 20:21:03 http: panic serving 127.0.0.1:40744: runtime error: invalid memory address or nil pointer dereference
goroutine 38 [running]:
net/http.(*conn).serve.func1(0xc820526680)
/home/harsha/.gimme/versions/go1.6.2.linux.amd64/src/net/http/server.go:1389 +0xc1
panic(0xbefa80, 0xc820010140)
/home/harsha/.gimme/versions/go1.6.2.linux.amd64/src/runtime/panic.go:443 +0x4e9
crypto/tls.(*Conn).serverHandshake(0xc820368300, 0x0, 0x0)
/home/harsha/.gimme/versions/go1.6.2.linux.amd64/src/crypto/tls/handshake_server.go:43 +0x4d6
crypto/tls.(*Conn).Handshake(0xc820368300, 0x0, 0x0)
/home/harsha/.gimme/versions/go1.6.2.linux.amd64/src/crypto/tls/conn.go:1035 +0x169
net/http.(*conn).serve(0xc820526680)
/home/harsha/.gimme/versions/go1.6.2.linux.amd64/src/net/http/server.go:1405 +0x382
created by net/http.(*Server).Serve
/home/harsha/.gimme/versions/go1.6.2.linux.amd64/src/net/http/server.go:2137 +0x44e
```
Fixes #2536
2016-08-23 00:20:15 -07:00
Harshavardhana
bccf549463
server: Move all the top level files into cmd folder. ( #2490 )
...
This change brings a change which was done for the 'mc'
package to allow for clean repo and have a cleaner
github drop in experience.
2016-08-18 16:23:42 -07:00