1
0
Fork 0
mirror of https://github.com/chrislusf/seaweedfs synced 2024-07-02 07:06:44 +02:00

avoid SIGSEGV on localFilerSocket (#3609)

https://github.com/seaweedfs/seaweedfs/issues/3607
This commit is contained in:
Konstantin Lebedev 2022-09-06 20:20:23 +05:00 committed by GitHub
parent 3c3682fcce
commit f4f6855c61
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -184,7 +184,10 @@ func (s3opt *S3Options) startS3Server() bool {
go stats_collect.LoopPushingMetric("s3", stats_collect.SourceName(uint32(*s3opt.port)), metricsAddress, metricsIntervalSec)
router := mux.NewRouter().SkipClean(true)
var localFilerSocket string
if s3opt.localFilerSocket != nil {
localFilerSocket = *s3opt.localFilerSocket
}
s3ApiServer, s3ApiServer_err := s3api.NewS3ApiServer(router, &s3api.S3ApiServerOption{
Filer: filerAddress,
Port: *s3opt.port,
@ -194,7 +197,7 @@ func (s3opt *S3Options) startS3Server() bool {
GrpcDialOption: grpcDialOption,
AllowEmptyFolder: *s3opt.allowEmptyFolder,
AllowDeleteBucketNotEmpty: *s3opt.allowDeleteBucketNotEmpty,
LocalFilerSocket: *s3opt.localFilerSocket,
LocalFilerSocket: localFilerSocket,
DataCenter: *s3opt.dataCenter,
})
if s3ApiServer_err != nil {