Skip to content

Commit

Permalink
Fixing merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
SophieKAn committed Jun 6, 2017
2 parents cea5bef + 0832ea1 commit 23b2c6b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
8 changes: 4 additions & 4 deletions config.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@
"machineIdentifiers": [
{
"name": "linux",
"port": "8080",
"color":"MediumSeaGreen"
"port": "***REMOVED***",
"color":"#058c42"
},
{
"name": "windows",
"port": "8080",
"color": "MediumSlateBlue"
"port": "***REMOVED***",
"color": "#2c5da5"
}
]
}
3 changes: 2 additions & 1 deletion static/style.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ const Style = `
.cs_lab {
background:tomato;
background:#070707;
width:200px;
padding:20px;
margin:10px;
justify-content:flex-start;
align-content:space-between;
}
Expand Down
3 changes: 2 additions & 1 deletion status.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ func (m *Machine) Update(out chan *Machine, config *Config) {
func getStatus(hostname string, config *Config) string {

for _, identifier := range config.MachineIdentifiers {
time.Sleep(100 * time.Millisecond)
if accessible(hostname, identifier["port"].(string)) {
return identifier["name"].(string)
}
Expand All @@ -63,7 +64,7 @@ func getStatus(hostname string, config *Config) string {
// accessible takes a hostname and a port number and tries to establish a
// connection using those parameters.
func accessible(hostn string, port string) bool {
conn, err := net.DialTimeout("tcp", hostn+":"+port, 1*time.Second)
conn, err := net.DialTimeout("tcp", hostn+":"+port, 5*time.Second)

if err == nil {
conn.Close()
Expand Down

0 comments on commit 23b2c6b

Please sign in to comment.