summaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorJakob Borg <jakob@nym.se>2014-06-30 01:47:32 +0200
committerJakob Borg <jakob@nym.se>2014-06-30 01:47:32 +0200
commitd7cc48eab2eafda81fe5dfd693d6be5652ebc1dc (patch)
tree2779aa5892621907b8ab2fd854b26c8f1663583e /cmd
parent8f3effed32bce654110273a78759d659cccc86c2 (diff)
parenta2da31056b3ef6d619feb542552c0c82274a50eb (diff)
Merge branch 'v0.8'
* v0.8: Increase deadlock timeout, make configurable (fixes #389, fixes #393) Remove spurious debug output in .stignore handling Connection notices are informational No need to hold a write lock in Override Don't whine about unexpected EOFs Ensure correct version string format Conflicts: model/model.go
Diffstat (limited to 'cmd')
-rw-r--r--cmd/syncthing/main.go16
1 files changed, 15 insertions, 1 deletions
diff --git a/cmd/syncthing/main.go b/cmd/syncthing/main.go
index 90ed07226a..a6c344d879 100644
--- a/cmd/syncthing/main.go
+++ b/cmd/syncthing/main.go
@@ -18,6 +18,7 @@ import (
"os"
"os/exec"
"path/filepath"
+ "regexp"
"runtime"
"runtime/debug"
"runtime/pprof"
@@ -48,6 +49,14 @@ var (
var l = logger.DefaultLogger
func init() {
+ if Version != "unknown-dev" {
+ // If not a generic dev build, version string should come from git describe
+ exp := regexp.MustCompile(`^v\d+\.\d+\.\d+(-\d+-g[0-9a-f]+)?(-dirty)?$`)
+ if !exp.MatchString(Version) {
+ l.Fatalf("Invalid version string %q;\n\tdoes not match regexp %v", Version, exp)
+ }
+ }
+
stamp, _ := strconv.Atoi(BuildStamp)
BuildDate = time.Unix(int64(stamp), 0)
@@ -106,7 +115,9 @@ The following enviroment variables are interpreted by syncthing:
STCPUPROFILE Write CPU profile to the specified file.
- STGUIASSETS Directory to load GUI assets from. Overrides compiled in assets.`
+ STGUIASSETS Directory to load GUI assets from. Overrides compiled in assets.
+
+ STDEADLOCKTIMEOUT Alter deadlock detection timeout (seconds; default 1200).`
)
func init() {
@@ -694,6 +705,9 @@ next:
wr = &limitedWriter{conn, rateBucket}
}
protoConn := protocol.NewConnection(remoteID, conn, wr, m)
+
+ l.Infof("Connection to %s established at %v", remoteID, conn.RemoteAddr())
+
m.AddConnection(conn, protoConn)
continue next
}